#include<stdio.h>
long jc(int n);
int main(void)
{
	int num, a;
	printf("please input a number: \n");
	while (scanf("%d", &num)==1)
	{
		a = jc(num);
		printf("%d\n", a);
	}
	return 0;
    getchar();
    getchar();
}
long jc(int n)
{
	long ans=1;
	if (n >= 1)
		ans = n * jc(n - 1);
	else
		ans = 1;
	return ans;
}